var domain=document.domain;
var oem = {
    favicon: "http://dev1.jingdutest.xyz:8082/oem/img/default_favicon.ico",
    loginBackground: "http://dev1.jingdutest.xyz:8082/oem/img/default_login_backgroud.jpg",
    bigLogo: "http://dev1.jingdutest.xyz:8082/oem/img/default_big_logo.png",
    logo:"http://dev1.jingdutest.xyz:8082/oem/img/default_logo.png",
    title:"大算盘"
}
$.get(url+"/common/queryOem",{domain:domain},function(data){
    if(data.success&&data.data){
        var oemData=data.data;
        oem.title=oemData.agWebTitle;
        oem.loginBackground=oemData.agLoginBg;
        oem.favicon=oemData.agAdvertLogo;
        oem.logo=oemData.agNavigationLogo
        oem.bigLogo=oemData.agLogo
        localStorage.setItem("oem",JSON.stringify(oem));
    }
    initOem();
},"json")

function initOem(){
    var oemJsonStr=localStorage.getItem("oem");
    if(oemJsonStr){
        oem=JSON.parse(oemJsonStr)
    }
    console.log(oemJsonStr,oem)
    document.getElementById("favicon").href = oem.favicon;
    $("#login_bg").attr("style", "background-image: url('" + oem.loginBackground + "');");
    $("#bigLogo").attr("src", oem.bigLogo);
    $("#logo").attr("style", "background: url('"+oem.logo+"');");
    document.title=oem.title
}